package cn.hs.blog.user.module;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.Unique;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent(nullValue = NullValue.NONE)
    @Unique
    private String name;

    @Persistent(nullValue = NullValue.NONE)
    private String password;

    @Persistent(nullValue = NullValue.NONE)
    private String email;

    @Persistent(nullValue = NullValue.NONE)
    private Date createDate;

    @Persistent(nullValue = NullValue.NONE)
    private String beable;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public String getBeable() {
        return beable;
    }

    public void setBeable(String beable) {
        this.beable = beable;
    }

    @Override
    public String toString() {
        return "id: " + id + ", name: " + name + ", password: " + password + ", email: " + email + ", createDate: "
                + createDate + ", beable: " + beable;
    }

}
